package cn.nubia.admin.application.service;

import cn.nubia.admin.application.bean.Terminal;
import cn.nubia.admin.common.mybatis.bean.Query;
import cn.nubia.admin.common.mybatis.service.BaseServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by justin on 15/7/5.
 */
@Service
public class TerminalService extends BaseServiceImpl<Terminal> {

    /***
     * 根据sortIndex获取terminals
     * @return
     */
    public List<Terminal>  listTerminals(){
        Query<Terminal> query = Query.build(Terminal.class);
        query.addOrder(Terminal.COLUMN_SORTINDEX, Query.DBOrder.ASC);
        return findByQuery(query);
    }
}
